package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.SysDictEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 字典对象 sys_dict
 *
 * @author ym
 * @date 2020-08-17
 */
@ApiModel("字典-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysDictUpdateParam extends BeanCovert<SysDictEntity>{

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("字典名称(中文)")
    @Size(max = 64, message = "字典名称长度超过{max}", groups = {Add.class, Update.class})
    private String dictName;

    @ApiModelProperty("字典编码(英文)")
    @Size(max = 32, message = "字典编码长度超过{max}", groups = {Add.class, Update.class})
    private String dictCode;

    @ApiModelProperty("字典项名称(中文)")
    @Size(max = 64, message = "字典项名称长度超过{max}", groups = {Add.class, Update.class})
    private String itemName;

    @ApiModelProperty("字典项编码")
    @Size(max = 32, message = "字典项编码长度超过{max}", groups = {Add.class, Update.class})
    private String itemCode;

    @ApiModelProperty("条目描述(中文页面展示)")
    @Size(max = 255, message = "条目描述长度超过{max}", groups = {Add.class, Update.class})
    private String itemDesc;

    @ApiModelProperty("条目顺序")
    private Long itemOrder;

    @ApiModelProperty("条目级别")
    private Integer itemLevel;

    @ApiModelProperty("条目状态")
    @Size(max = 10, message = "条目状态长度超过{max}", groups = {Add.class, Update.class})
    private String itemState;

    @ApiModelProperty("父类条目编码")
    @Size(max = 32, message = "父类条目编码长度超过{max}", groups = {Add.class, Update.class})
    private String parentItemCode;


}
